#!/bin/bash
if_cmake=1
if (($if_cmake == 0)); then
    mpicxx -c -I./include libxpmem.c -o libxpmem.o
    ar rcs -o libxpmem.a libxpmem.o
    mpicxx xpmem_SR.cpp -g -I./include -L. -lxpmem -o xpmem_SR
else 
    cmake -S . -B build
    cmake --build build
fi